package com.itbaizhan.service;

import com.itbaizhan.dao.MembersInfoDao;
import com.itbaizhan.entity.MembersInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author luo20
 */
@Service
public class MembersInfoService {

    @Autowired
    private MembersInfoDao membersInfoDao;

    //查询所有
    public List<MembersInfo> findAll(){
        return membersInfoDao.findAll();
    }
    //根据id查询信息
    public MembersInfo findById(Integer id){
        return membersInfoDao.findById(id);
    }
    //根据id修改指定信息
    public int updateById(MembersInfo membersInfo){
        return membersInfoDao.updateByMembersInfo(membersInfo);
    }
    //根据id删除信息
    public int deleteById(Integer id){
        return membersInfoDao.deleteById(id);
    }
}
